<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>司机管理</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/car/css/cars-cx.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/calendar/WdatePicker.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/additional-methods.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery.form.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/car/js/register-car-tzh.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/dialog.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/dialog.css">
<script type="text/javascript">
	function add_event(tr) {
		tr.onmouseover = function() {
			tr.className += ' hover';
		};
		tr.onmouseout = function() {
			tr.className = tr.className.replace(' hover', '');
		};
	}

	function stripe(table) {
		var trs = table.getElementsByTagName("tr");
		for ( var i = 1; i < trs.length; i++) {
			var tr = trs[i];
			tr.className = i % 2 != 0 ? 'odd' : 'even';
			add_event(tr);
		}
	}

	window.onload = function() {
		var table = document.getElementById('my_registed_cars_table');
		stripe(table);
	}
</script>

<style type="text/css">
#submit_button {
	width: 100px;
	height: 40px;
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_normal.png");
	background-size: 100% 100%;
	border: none;
	cursor: pointer;
	font-family: 宋体;
	font-size: 18px;
	font-style: normal;
	color: #fff;
	font-weight: bold;
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_normal_ie.png")
		\9;
}

#submit_button:hover,#submit_button.hover {
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_hover.png");
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_hover_ie.png")
		\9;
}

#submit_button:active,#submit_button.active {
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_down.png");
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_down_ie.png")
		\9;
}
</style>
</head>

<body>
	<div>
		<jsp:include page="../userAdmin/nav.jsp">
			<jsp:param value="nav_main" name="nav" />
		</jsp:include>
	</div>
	<div class="realCer">

		<!--主体部分-->
		<div class="realMain clearfix mt10">
			<!--左侧菜单-->
			<div class="realLeft" id="meunLeft">
				<jsp:include page="../userAdmin/leftMenu.jsp">
					<jsp:param value="con_nav_main" name="con_nav" />
					<jsp:param value="showMyRegistedDrivers" name="selectMenu"/>
				</jsp:include>
			</div>
			<!--中间-->
			<div class="realRight ml10">
				<!--中间-->
				<div class="realR_left">
					<div class="box">
						<div class="tit">
							<strong>司机管理</strong>
						</div>
						<div class="con">
							<div id="my_registed_drivers_div" class="form_wrap clearfix">
								<table id="my_registed_drivers_table">
									<tr style="background-color: silver;">
										<th>序号</th>
										<th>姓名</th>
										<th>身份证号码</th>
										<th>手机</th>
										<th>审核状态</th>
										<th>修改</th>
									</tr>
									<s:iterator value="driverList" id="myDriver" status="st">
										<tr>
											<td><s:property value="#st.index+1" />
											</td>
											<td><s:property value="#myDriver.name" />
											</td>
											<td><s:property value="#myDriver.idCardNumber" />
											</td>
											<td><s:property value="#myDriver.mobilePhone" />
											</td>
											<td>
												<s:if test="#myDriver.status == -1">审核中</s:if>
												<s:elseif test="#myDriver.status == 0">未通过</s:elseif>
												<s:elseif test="#myDriver.status == 1">已通过</s:elseif>
											</td>
											<td><a
												href="<s:url action="editDriver.action?driverId=%{#myDriver.id}" namespace="/car"></s:url>">修改</a>
											</td>
										</tr>
									</s:iterator>
								</table>
							</div>
							<!-- <a class="add" href="javascript:;" onclick="openDialog();">添加司机</a> -->
							<div style="width:100%; text-align:right;">
								<br>
								<a href="${pageContext.request.contextPath}/car/preAddDriver.action">添加司机</a>
								<br>
							</div>
							<script type="text/javascript">
								var $driver_select = $("#driver_select");
								var dialog;
								function openDialog()
								{
									$.ajax({
										type : "post",
										url : "car/preAddDriver.action",
										data : {
										},
										dataType : "html",
										success : function(data) {
											dialog = new Dialog({type:'html',value:data}, {title:'添加司机信息'}, {fixed:false});
											dialog.show();
										}
									});
									
								}
							</script>
						</div>
					</div>
				</div>
				<!-- 中间 -->
				<!--右侧-->
				<div class="realR_right">
					<%-- <div class="box mb10">
						<jsp:include page="../noticeTemplate.jsp"></jsp:include>
					</div> --%>
				</div>
				<!--右侧-->
			</div>
			<!--中由-->
		</div>
	</div>
	<div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>
